package com.xone.collaboration.common;

public class ResultUtils {

    /**
     * @param <T>
     * @return
     */
    public static <T> Result<T> success(){
        return Result.of(Boolean.TRUE,null,null);
    }


    /**
     *
     * @param content
     * @param <T>
     * @return
     */
    public static <T> Result<T> success(T content){
        return Result.of(Boolean.TRUE,content,null);
    }


    /**
     *
     * @param <T>
     * @return
     */
    public static <T> Result<T> fail(){
        return Result.of(Boolean.FALSE,null,null);
    }

    /**
     *
     * @param content
     * @param message
     * @param <T>
     * @return
     */
    public static <T> Result<T> fail(T content,String message){
        return Result.of(Boolean.FALSE,content,message);
    }


    /**
     *
     * @param message
     * @param <T>
     * @return
     */
    public static <T> Result<T> fail(String message){
        return Result.of(Boolean.FALSE,null,message);
    }
}
